Skip to content

Factor common logic out of add_*_parameter methods#676

Open
everyday847 wants to merge 1 commit intoRosettaCommons:mainfrom
everyday847:origin/everyday847/parametric_helpers
Open

Factor common logic out of add_*_parameter methods#676
everyday847 wants to merge 1 commit intoRosettaCommons:mainfrom
everyday847:origin/everyday847/parametric_helpers

Conversation

@everyday847
Copy link
Copy Markdown
Member

Extract a private configure_and_add_parameter() helper that handles the shared configuration steps (name, description, units, type, capabilities, global flag) and add_parameter() call. Each add_*_parameter() and add_custom_parameter() now only constructs the type-specific object, sets any conditional default value, and delegates to the helper. Also replace bare new with make_shared.

Extract a private configure_and_add_parameter() helper that handles
the shared configuration steps (name, description, units, type,
capabilities, global flag) and add_parameter() call. Each
add_*_parameter() and add_custom_parameter() now only constructs the
type-specific object, sets any conditional default value, and
delegates to the helper. Also replace bare new with make_shared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant